package com.example.testdemo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@ResponseBody
public class PropertiesController {

    @Value("${demo.key1}")
    private String key1;
    @Value("${string.str1}")
    private String str1;

    @Value("${string.str2}")
    private String str2;

    @Value("${string.str3}")
    private String str3;
    @RequestMapping("/readKey")
    public void properties() {
        System.out.println(str1);
        System.out.println(str2);
        System.out.println(str3);
    }
}
